import axios from "axios";

export const isDev = process.env.NODE_ENV === "development";

export const BASE = isDev
  ? `//${location.hostname}:5173/api/`
  : `//${location.hostname}:9090/`;

export const BASE_URL = BASE;

export const UPLOAD_RESOURCE = BASE_URL + "upload/";

// create instance of axios
export const request = axios.create({
  baseURL: BASE_URL,
});

// export const request = axios.create({
//     baseURL: "http://localhost:9090/",
// });
